home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / unattended-upgrades.postinst < prev    next >
Text File  |  2009-07-20  |  2KB  |  60 lines

  1. #!/bin/sh
  2. # see: dh_installdeb(1)
  3.  
  4. set -e
  5.  
  6. # Do debconf stuff here
  7. . /usr/share/debconf/confmodule
  8.  
  9. # summary of how this script can be called:
  10. #        * <postinst> `configure' <most-recently-configured-version>
  11. #        * <old-postinst> `abort-upgrade' <new version>
  12. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  13. #          <new-version>
  14. #        * <postinst> `abort-remove'
  15. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  16. #          <failed-install-package> <version> `removing'
  17. #          <conflicting-package> <version>
  18. # for details, see http://www.debian.org/doc/debian-policy/ or
  19. # the debian-policy package
  20.  
  21.  
  22. case "$1" in
  23.     configure)
  24.     # *sigh* typo in filename in version 0.51ubuntu1
  25.     if [ -e /etc/pm/sleep.d/10_unatteded-upgrades-hibernate ]; then
  26.         rm -f /etc/pm/sleep.d/10_unatteded-upgrades-hibernate
  27.     fi
  28.  
  29.     db_get unattended-upgrades/enable_auto_updates || true
  30.     if [ "${RET}" = "true" ]; then
  31.     NEWFILE="/usr/share/unattended-upgrades/20auto-upgrades"
  32.     CONFIG="/etc/apt/apt.conf.d/20auto-upgrades"
  33.     ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG"
  34.     ucfr unattended-upgrades "$CONFIG"
  35.     fi
  36.     ;;
  37.  
  38.     abort-upgrade|abort-remove|abort-deconfigure)
  39.     ;;
  40.  
  41.     *)
  42.         echo "postinst called with unknown argument \`$1'" >&2
  43.         exit 1
  44.     ;;
  45. esac
  46.  
  47. # dh_installdeb will replace this with shell code automatically
  48. # generated by other debhelper scripts.
  49.  
  50. # Automatically added by dh_installinit
  51. if [ -x "/etc/init.d/unattended-upgrades" ]; then
  52.     update-rc.d unattended-upgrades start 10 0 6 . >/dev/null || exit $?
  53. fi
  54. # End automatically added section
  55.  
  56.  
  57. exit 0
  58.  
  59.  
  60.